<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
include dirname(__FILE__) . '/../../../config/config.php';
include dirname(__FILE__) . '/../../../config/menu.php';

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => '蓝科CMS系统',

    // preloading 'log' component
    'preload' => array('log'),

    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
    ),
    'modules' => array(
        // uncomment the following to enable the Gii tool
//        'install' => array(),
        'gii'=>array(
            'class'=>'system.gii.GiiModule',
            'password'=>'123456',
            // 'ipFilters'=>array(...IP 列表...),
            // 'newFileMode'=>0666,
            // 'newDirMode'=>0777,
        )
    ),

    // application components
    'components' => array(
        'user' => array(
            // enable cookie-based authentication
            'allowAutoLogin' => true,
        ),
        'session' => array(
            'class' => 'CHttpSession',
            'autoStart' => true,
            'timeout' => 1800,
        ),
        'request' => array(
            'enableCsrfValidation' => true,
            'enableCookieValidation' => true
        ),
        'cache' => array(
            'class' => 'CFileCache',
        ),
        'db' => require dirname(__FILE__) . '/../../../common/database.php',
        'errorHandler' => array(
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            ),
        ),
        'messages' => array(
            'class' => 'CDbMessageSource',
            'sourceMessageTable' => 'xm_sourcemessage',
            'translatedMessageTable' => 'xm_translatedmessage'
        )
    ),

    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
        // this is used in contact page
        'adminEmail' => '458820281@qq.com',
        'menu'=>$MENU
    ),
    'theme' => isset($APPCFG['theme']) ? $APPCFG['theme'] : "basic",
    'language' => 'zh_cn',
    'sourceLanguage' => 'en_us',
);